# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Daniel Wallace <danielwallace at gtmanfred dot com>

pkgname=python-glanceclient
pkgver=4.4.0
pkgrel=1
pkgdesc="OpenStack Image API Client Library"
arch=('any')
url="https://docs.openstack.org/developer/python-glanceclient"
license=('Apache')
depends=('python-pbr' 'python-prettytable' 'python-keystoneauth1' 'python-requests' 'python-warlock'
         'python-oslo-utils' 'python-oslo-i18n' 'python-wrapt' 'python-pyopenssl')
makedepends=('python-setuptools')
checkdepends=('python-stestr' 'python-ddt' 'python-requests-mock' 'python-testscenarios')
options=('!emptydirs')
source=("https://github.com/openstack/python-glanceclient/archive/$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('61c2b6f4556db30197092fafde15c9f655826b67a430eca23ac2ec396f8ff9f913aa3fb7474cd86921f5e5fa124c182f3d2563412fa6f0a941e9f80daa753872')

export PBR_VERSION=$pkgver

build() {
  cd python-glanceclient-$pkgver
  python setup.py build
}

check() {
  cd python-glanceclient-$pkgver
  stestr run
}

package() {
  cd python-glanceclient-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1
}
